package com.wanfan.wanfanBrush.config;

import cn.dev33.satoken.interceptor.SaInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 晚饭
 * @date 2025/06/12
 */

@Configuration
public class SaTokenConfig implements WebMvcConfigurer {
    //注册Sa-Token拦截器 ,开启注解式鉴权
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new SaInterceptor()).addPathPatterns("/**");
    }
}
